<template>
	<view>
		<pickerDates title="备案登记时间" name="keepRecordsDate" v-model="keepRecordsDate"></pickerDates>
		
		<upload-img max="20" title="备案照片" v-model="keepRecords"></upload-img>
		
		<view style="height: 160rpx;"></view>
		
		<view class="plr fixed bottom ptb10 whiteBg">
			<view class="safeBottom">
				<button @tap="confirm" class="btn ptb10 block rds23 shadow">确认</button>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keepRecordsDate : "" ,
				keepRecords : "" 
			}
		},
		computed:{
			listValue(){
				return Array.isArray(this.keepRecords) ? JSON.stringify(this.keepRecords) : this.keepRecords ;
			}
		},
		onLoad(e) {
			this.keepRecords = e.keepRecords || "";
			this.keepRecordsDate = e.keepRecordsDate || "";
		},
		methods: {
			confirm(){
				uni.$emit("saveRecords" ,{
					keepRecordsDate : this.keepRecordsDate ,
					keepRecords : this.listValue
				});
				uni.navigateBack({
					delta:1
				});
			}
		}
	}
</script>

<style>
page{
	background-color: #fff;
}
</style>
